//
//  AppDelegate.m
//  digital_robot_demo
//
//  Created by xskj on 2024/8/29.
//

#import "AppDelegate.h"
#import "IQKeyboardManager.h"


@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
    [self initIQKeyBordManger];
    return YES;
}


#pragma mark - 键盘设置
-(void)initIQKeyBordManger{
    IQKeyboardManager *keyboardManager = [IQKeyboardManager sharedManager]; // 获取类库的单例变量
    keyboardManager.enable = NO; // 控制整个功能是否启用
    keyboardManager.shouldResignOnTouchOutside = YES; // 控制点击背景是否收起键盘
    keyboardManager.toolbarManageBehaviour = IQAutoToolbarBySubviews; // 有多个输入框时，可以通过点击Toolbar 上的“前一个”“后一个”按钮来实现移动到不同的输入框
    keyboardManager.enableAutoToolbar = NO; // 控制是否显示键盘上的工具条
    keyboardManager.keyboardDistanceFromTextField = 10.0f; // 输入框距离键盘的距离
}

#pragma mark - UISceneSession lifecycle


- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
    // Called when a new scene session is being created.
    // Use this method to select a configuration to create the new scene with.
    return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}


- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
    // Called when the user discards a scene session.
    // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
    // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
    
    
}


//- (void)applicationWillResignActive:(UIApplication * )application {
//    NSLog(@"UniPluginProtocol Func: %@,%s",self,__func__);
//}
//
//- (void)applicationDidBecomeActive:(UIApplication *)application {
//    NSLog(@"UniPluginProtocol Func: %@,%s",self,__func__);
//}
//
//- (void)applicationDidEnterBackground:(UIApplication *)application {
//    NSLog(@"UniPluginProtocol Func: %@,%s",self,__func__);
//}
//
//- (void)applicationWillEnterForeground:(UIApplication *)application {
//    NSLog(@"UniPluginProtocol Func: %@,%s",self,__func__);
//}
//
//- (void)applicationWillTerminate:(UIApplication *)application {
//    NSLog(@"UniPluginProtocol Func: %@,%s",self,__func__);
//}

///>  app 进入后台 会调用 （app 进入非活跃状态）的方法
- (void)applicationDidEnterBackground:(UIApplication *)application{
    
    
}

///>  app 进入前台
- (void)applicationWillEnterForeground:(UIApplication *)application{
    
    
}

@end
